﻿#include "layer.h"
#include <QPen>

namespace Entities
{

Layer::Layer()
{

}
Layer::Layer(const std::string& name,int flags,bool off,int color,int width)
{
    m_name=name;
    m_flags=flags;
    m_off=off;
    m_color = color;
    m_width = width;
}

Layer::~Layer()
{
}

Layer::Layer(const Layer &layer)
{
    m_name=layer.GetName();
    m_flags=layer.GetFlags();
    m_off=layer.IsOff();
    m_color = layer.GetColor();
    m_width = layer.GetWidth();
}

Layer& Layer::operator=(const Layer&layer)
{
    if(&layer!=this)
    {
        m_name=layer.GetName();
        m_flags=layer.GetFlags();
        m_off=layer.IsOff();
        m_color = layer.GetColor();
        m_width = layer.GetWidth();
    }
    return *this;
}

Layer* Layer::Clone()
{
    Layer *layer=new Layer(*this);
    return layer;
}

void Layer::SetLineType(std::string stype)
{
    m_linetype = stype;
}

}
